package com.aier.admin.action;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.aier.admin.entity.SysCity;
import com.aier.admin.service.IAdminCitiesMapService;

@Scope("prototype")
@Component("adminCitiesMapAction")
public class AdminCitiesMapAction extends AdminBaseAction {

    /**
     * 城市Map
     */
    private static final long serialVersionUID = 1L;
    //城市id
    private int cid;
    //权限
    private int authority;
    //城市集合
    private List<SysCity> cities;
    @Override
    public String execute() {

        return SUCCESS;
    }
    
    @Resource(name = "adminCitiesMapService")
    private IAdminCitiesMapService adminCitiesMapService;
    
    //根据cid查询子城市
    public String searchCity(){
        cities=adminCitiesMapService.searchCity(cid);
        authority=1;
        return SUCCESS;
    }

    public List<SysCity> getCities() {
        return cities;
    }


    public void setCities(List<SysCity> cities) {
        this.cities = cities;
    }


    public int getCid() {
        return cid;
    }


    public void setCid(int cid) {
        this.cid = cid;
    }

    public int getAuthority() {
        return authority;
    }

    public void setAuthority(int authority) {
        this.authority = authority;
    }
    
    
    
    
}
